/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 */
/*class MyArray{
    public Object[] array = new Object[10]; //成员变量

    public void setVal(int pos ,Object val){
        this.array[pos] = val;
    }
    public Object getVal(int pos){
        return this.array[pos];
    }
}*/
public class Test2 {
   /* public static void main(String[] args) {
        MyArray myArray = new MyArray();
        myArray.setVal(0,12);
        myArray.setVal(1,"hello");
        //int a = myArray.getVal(0);//err ,需要强制类型转换
        int a = (int)myArray.getVal(0);
        System.out.println(a);
        String str =(String) myArray.getVal(1);
        //String str = myArray.getVal(1);//err，,需要强制类型转换
        System.out.println(str);

    }*/
}
